/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.freedom.imarket.view.resolver;

import java.util.Locale;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.view.AbstractCachingViewResolver;
import org.springframework.web.servlet.view.UrlBasedViewResolver;

/**
 *
 * @author edoardo
 */
public class JSInternalViewResolver extends AbstractCachingViewResolver{

    @Override
    protected View loadView(String viewName, Locale locale) throws Exception {
        View view = new View() {

            @Override
            public String getContentType() {
                return "text/javascript";
            }

            @Override
            public void render(Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
                System.out.println("---------------------");
            }
        };
        return view;
    }
    
    
    
}
